package com.sun.kamun.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import com.sun.kamun.entity.User;
import com.sun.kamun.mapper.UserMapper;
import com.sun.kamun.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public void register(User user) {
        userMapper.insert(user);
    }

    @Override
    public User login(String user_name, String user_password) {
        return userMapper.selectByLogin(user_name, user_password);
    }

//    @Override
//    public List<User> list(LambdaQueryWrapper<User> wrapper) {
//        return userMapper.selectList(wrapper);
//    }


//    @Override
//    public List<User> findByKeyword(String username) {
//        LambdaQueryWrapper<User> wrapper=new LambdaQueryWrapper<>();
//        wrapper.like(User::getUserName,username);
//        return userMapper.selectList(wrapper);
//    }


}
